﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using eTerm.MsSql.DbProvider;
using System.Web.Security;

namespace eTerm.Platform.Web
{
    public partial class Default : BaseEntityPage<SysUser>
    {
        protected override void InitPageLoad()
        {
            var model = SysUser.All().Where(l=>l.UserId==UID).Join(SysCompany.All(),l=>l.CompanyCode,r=>r.CompanyCode,(l,r)=>new { Compay = r.CompayName,DisplayName = l.DisplayName }).FirstOrDefault();
            lblUserName.Text = string.Format("&nbsp;&nbsp;{0}[{1}]&nbsp;&nbsp;", model.DisplayName, model.Compay);
        }


        protected override SysUser Get()
        {
            return CurrentUser;
        }

        protected override string PageCode
        {
            get { return string.Empty; }
        }

        protected void lbloginOut_Click(object sender, EventArgs e)
        {
            FormsAuthentication.SignOut();
        }
    }
}
